Skip to content

feat: support InvokeAI authentication#217

Merged
lstein merged 5 commits intomasterfrom
lstein/feature/invoke-recall-parameters
Apr 14, 2026
Merged

feat: support InvokeAI authentication#217
lstein merged 5 commits intomasterfrom
lstein/feature/invoke-recall-parameters

Conversation

@lstein
Copy link
Copy Markdown
Owner

@lstein lstein commented Apr 12, 2026

Summary

  • InvokeAI multi-user authentication: When username and password are configured, the recall endpoint now obtains a JWT bearer token via InvokeAI's /api/v1/auth/login and includes it as a Bearer header in recall POST requests. The token is cached in-process and automatically refreshed on 401 or expiry. Single-user mode (no credentials) continues to work without authentication.
  • Accordion settings panel: Reorganize the settings dialog into collapsible sections (Slideshow Settings, Appearance, Search, API Integration) to reduce visual clutter. Album selector stays always-visible at top. Open/closed state persists in localStorage.
  • Strict recall mode: Adds ?strict=true query parameter to the InvokeAI recall POST so parameters not included in the payload are reset to their defaults on the InvokeAI side.
  • UI polish: InvokeAI password field now matches username field width; help text moved below password field with updated wording.

Test plan

  • Verify settings accordion sections open/close and persist state across page reloads
  • Verify Album selector remains always visible above the accordions
  • Test recall/remix with a single-user InvokeAI backend (no credentials) — should work as before
  • Test recall/remix with a multi-user InvokeAI backend using valid credentials
  • Test recall/remix with invalid credentials — should return a clear error
  • Verify token is reused across multiple recall calls (check server logs for single login)
  • Verify changing credentials in settings invalidates the cached token
  • Run pytest tests/backend/test_invoke_router.py — all 7 tests pass

🤖 Generated with Claude Code

@lstein lstein marked this pull request as draft April 12, 2026 03:31
@lstein lstein self-assigned this Apr 12, 2026
lstein and others added 2 commits April 13, 2026 21:12
Reorganize the settings dialog into collapsible accordion sections
(Slideshow, Appearance, Search, API Integration) to reduce visual
clutter. Album selector stays always-visible at top. Accordion
open/closed state is persisted in localStorage.

Also adds ?strict=true to the InvokeAI recall POST so parameters
not included in the payload are reset to defaults on the InvokeAI side.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When username and password are configured in the settings panel,
the recall endpoint now obtains a JWT bearer token via the InvokeAI
/api/v1/auth/login endpoint and includes it in the recall POST.
The token is cached in-process and automatically refreshed on 401
or expiry. Single-user mode (no credentials) continues to work
without authentication.

Also invalidates the token cache when settings are updated and
fixes test stubs to accept the new params/headers kwargs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lstein lstein changed the title feature: send recall_parameters to running invokeai feat: support InvokeAI authentication Apr 14, 2026
lstein and others added 2 commits April 13, 2026 22:29
Direct reference images (those without an IP Adapter model) were
silently dropped from the recall payload. Now they are sent as
`reference_images: [{image_name: "..."}]` alongside the existing
`ip_adapters` array for model-backed references.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Try recall without credentials first; only authenticate on 401.
  This avoids a 403 when InvokeAI runs in single-user mode.
- Show error messages below the Recall/Remix buttons instead of
  only setting the tooltip.
- Replace Unicode "✕" with an inline SVG to prevent emoji-sized
  rendering that inflated button height.
- Pin recall/remix buttons and "View Metadata" link below the
  scrollable metadata area so they stay visible.
- Move filepath into the metadata table as a "Path" row.
- Increase "View Metadata (JSON)" link font size to match filename.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lstein lstein marked this pull request as ready for review April 14, 2026 04:33
@lstein lstein enabled auto-merge (squash) April 14, 2026 04:34
@lstein lstein merged commit a7d7e64 into master Apr 14, 2026
6 checks passed
@lstein lstein deleted the lstein/feature/invoke-recall-parameters branch April 14, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant